<template>
    <div>
        <div >
            <button @click="back">回退按钮</button>
             <div>热门艺人</div>  </div>

        <div>
            <div v-for="item in hotartist" :key="item.name" style="width:20px height:20px">
                <img :src="item.img"  alt="" >
                <div>{{item.name}}</div>
            </div>
        </div>
       
    </div>
</template>

<script>
import {homeDataApi} from '@/api/homeDataApi'
export default {
    data() {
        return {
            hotartist: []
            
        }
    },
    async created () {
        let data= await homeDataApi('hotArtist');
        this.hotartist = data
    },
    methods:{
        back(){
            this.$router.go(-1)
        }
    }
}
</script>

<style lang="scss" scoped>
img{
    width: 100px;
    height: 100px;
}

</style>